package unit4.work.animal;

import java.util.Date;

public class Frog extends Animal implements IAnimal{
    String lq;
    public String getLq() {
        return lq;
    }

    public void setLq(String lq) {
        this.lq = lq;
    }
    public Frog(){

    }
    public Frog(String name, String food, String area,String lq){
        super(name, food, area);
        this.lq="两栖";
    }

    @Override
    public String findFood() {
        return  super.getName()+"找"+super.getFood();
    }

    @Override
    String wholeLife() {
        String b=this.born();
        String f=this.findFood();
        String e=this.eat();
        String o=this.old();
        String d=this.die();
        String s=this.sick();
        return b+"\n"+f+"\n"+e+"\n"+o+"\n"+s+"\n"+d;
    }

    @Override
    public String born() {
        String n=super.getName();
        Date d=new Date();
        return n+"出生于"+d.toString();
    }

    @Override
    public String old() {
        return  super.getName()+"3年后变老了";
    }

    @Override
    public String sick() {
        return  super.getName()+"3年后被吃了了" ;
    }

    @Override
    public String die() {
        return  super.getName()+"3年后生病了";
    }
}
